<?php
class Utilities{
	
	public function __construct(){}
	
	public function changeLanuage( $lang = 'en' ){
		$urls = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
		if (stristr(strtolower($urls), '&lang=') === FALSE){
			$strUrl[0] = $urls;
			//$strUrl = split('&lang=', $urls);
		}else{						
			$strUrl = split('&lang=', $urls);
		}
		if (stristr(strtolower($strUrl[0]), "?") === FALSE){
			$url = $strUrl[0].'?lang='.$lang;
		}else{
			$url = $strUrl[0].'&lang='.$lang;
		}
		return $url;
	} 
}
?>